package com.leapp.sk.ui.adapter

import android.content.Context
import com.example.mvp.adapter.BaseLibAdapter
import com.example.mvp.binder.BaseDataBinder
import com.leapp.sk.bean.TransferTecherEntity
import com.leapp.sk.binder.BaseBinder
import com.example.inter.ItemClickInterface
import com.leapp.sk.viewdelegate.adapter.classs.TransferThcherAdapterDelegate

/**
 * 转让老师适配器
 * @author  chaohaipeng  on 2018/8/1.
 */
class TransferTecherAdapter (context: Context, mlist: List<TransferTecherEntity>,itemClickInterfaces: ItemClickInterface): BaseLibAdapter<TransferThcherAdapterDelegate, TransferTecherEntity>(context,mlist){
    /**
     * 数据
     */
    val mList = mlist
    /**
     * 上下文
     */
    val mContext = context

    val itemClickInterface=itemClickInterfaces
    override fun bindEvenListener(viewDelegate: TransferThcherAdapterDelegate?, position: Int) {
        viewDelegate?.initEvent(mList,this,position,itemClickInterface)
    }
    override fun notifyView(viewDelegate: TransferThcherAdapterDelegate?, position: Int) {
        viewDelegate?.initData(mContext,mList.get(position))


    }

    override fun getDelegateClass(): Class<TransferThcherAdapterDelegate> {
        return TransferThcherAdapterDelegate::class.java

    }

    override fun getDataBinder(): BaseDataBinder<*, *> {
        return BaseBinder()
    }
}